pub fn remove_element(nums: &mut Vec<i32>, val: i32) -> i32 {
    let mut i = 0usize;
    let len = nums.len();

    for j in 0..len {
        if nums[j] != val {
            nums[i] = nums[j];
            i += 1
        }
    }

    return i as i32;
}
